#include<bits/stdc++.h>
using namespace std;
int __gcd(int a,int b)
{
	while(b!=0)
	{
		int temp=b;
		b=a%b;
		a=temp;
	}
	return a;
}

int main()
{
	int n=0,m=0,h=0;
	cin>>n>>m>>h;
	int ans=__gcd(__gcd(n,m),h);
	int square_num=(n/ans)*(m/ans)*(h/ans);
	cout<<square_num; 
	return 0;
}
